import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

public class EuroTest {
    @Test
    public void assert10EuroIsEqualTo10Euro(){
        assertEquals(new Euro(10), new Euro(10));
    }

    @Test
    public void assert10EuroIsNotEqualToNull() {
        assertFalse(new Euro(10).equals(null));
    }

    @Test
    public void assert10EuroIsNotEqualToObject(){
        assertFalse(new Euro(10).equals(new Object()));
    }

    @Test
    public void assert10EuroIsNotEqualTo11Euro() {
        assertFalse(new Euro(10).equals(new Euro(11)));
    }
    @Test
    public void assert10EuroIsEqualTo5EuroPlus5Euro(){
        assertTrue(new Euro(10).equals(new Euro(5).plus(new Euro(5))));
    }

    @Test
    public void assert10EuroDoesNotEqual5EuroPlus2Euro(){
        assertFalse(new Euro(10).equals(new Euro(5).plus(new Euro(2))));
    }

    @Test
         public void assert10EuroEquals5EuroPlus2EuroPlus3Euro(){
        assertTrue(new Euro(10).equals(new Euro(5).plus(new Euro(2), new Euro(3))));
    }

    @Test
    public void assert10EurosDoesNotEqual10Dollars(){
        assertFalse(new Euro(10).equals(new Dollar(10)));
    }

    @Test
    public void assert13Point5DollarsEquals10Euros(){
        assertTrue(new Dollar(13.5).equals(new Euro(10)));
    }

}
